﻿using System;
using System.Collections.Generic;
using System.Text;

namespace daSyntaxAnalyser.SyntaxTree
{
    using daBase.Objects;

    public class PackedTypeElement : SyntaxTreeElement, ITypeElement
    {
        private ITypeElement type;

        public ITypeElement Type { get { return type; } set { type = value; } }

        public PackedTypeElement(TokenInfo StartInfo, ITypeElement Type, List<TokenInfo> Comments)
            : base(StartInfo, Comments)
        {
            type = Type;
        }

        public override string ToString()
        {
            return string.Format("packed {0}", type);
        }

        protected override IEnumerator<ISyntaxTreeElement> CreateEnumerator()
        {
            yield return type;
        }
    }
}
